{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "58d9c51c",
   "metadata": {},
   "outputs": [],
   "source": [
    "#| default_exp fetch_models"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3f222bab",
   "metadata": {},
   "outputs": [],
   "source": [
    "#| exporti\n",
    "from fastcore.script import call_parse\n",
    "import whisperx\n",
    "import whisper"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "24c38c45",
   "metadata": {},
   "source": [
    "# Download models\n",
    "\n",
    "Download and cache all the models we might need for training and preprocessing. Run this first on a cluster node that has unlimited internet access.\n",
    "\n",
    "**Usage:**  \n",
    "```\n",
    "python -m whisperspeech.fetch_models\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "18ef67d5",
   "metadata": {},
   "outputs": [],
   "source": [
    "#| exporti\n",
    "@call_parse\n",
    "def main():\n",
    "    whisper.load_model('base.en')\n",
    "    whisper.load_model('small.en')\n",
    "    whisperx.vad.load_vad_model('cpu')\n",
    "    whisperx.asr.load_model('medium.en', \"cpu\", compute_type=\"float16\", language='en')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "python3",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
